package com.share.dao.site.navigation.impl;

import java.util.LinkedHashMap;
import java.util.List;

import org.springframework.stereotype.Component;

import com.share.bean.site.SiteNavi;
import com.share.commons.base.dao.BaseDaoSupport;
import com.share.dao.site.navigation.SiteNaviDao;


/**
 * <p>Title：首页导航条持久层实现</p>
 * <p>Description：</p>
 * @Author：杨浩泉
 * @Date：2010-4-3
 */
@Component("siteNaviDao")
public class SiteNaviDaoImpl extends BaseDaoSupport<SiteNavi> implements SiteNaviDao{
	
	public void deleteSiteNaviDao(Object[] ids) throws RuntimeException {
		
		this.deleteAllObject(SiteNavi.class, ids) ;
	}

	@SuppressWarnings("unchecked")
	public List<SiteNavi> queryAllSiteNaviDao(String hql,LinkedHashMap<String , String> orderby)
			throws RuntimeException {
		return (List<SiteNavi>) this.find(hql, orderby) ;
	}

	
	public SiteNavi queryByIdSiteNaviDao(int id) throws RuntimeException {
		
		return (SiteNavi) this.loadById(SiteNavi.class, id) ;
	}

	
	public void saveSiteNaviDao(SiteNavi sn) throws RuntimeException {
		this.saveObject(sn) ;
		
	}

	public void updateSiteNaviDao(SiteNavi sn) throws RuntimeException {
		
		this.updateObject(sn) ;
		
	}

}
